package com.xiaoxing.zhinenghuacangku_rizhao.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.xiaoxing.zhinenghuacangku_rizhao.mvp.contract.RiZhao_YiKuQingZhangContract;
import com.xiaoxing.zhinenghuacangku_rizhao.mvp.model.RiZhao_YiKuQingZhangModel;

import dagger.Module;
import dagger.Provides;


@Module
public class RiZhao_YiKuQingZhangModule {
    private RiZhao_YiKuQingZhangContract.View view;

    /**
     * 构建YiKuQingZhangModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public RiZhao_YiKuQingZhangModule(RiZhao_YiKuQingZhangContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    RiZhao_YiKuQingZhangContract.View provideYiKuQingZhangView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    RiZhao_YiKuQingZhangContract.Model provideYiKuQingZhangModel(RiZhao_YiKuQingZhangModel model) {
        return model;
    }
}